Skip to main content

All Questions

1vote
1answer
65views

How to remove xarray plot bad value edge colour

I know set_bad can colour the pixel into a specific colour but in my example I only want to have edge colour for blue and grey pixels with values and not the bad pixels (red) import matplotlib.pyplot ...
Jane's user avatar
  • 626
0votes
1answer
53views

PYTHON- Removing colorbar from imbedded figure in tkinter when using xarray's methods to plot

I am currently implementing a simple GUI used to display Netcdf content as well as a few other uses, however I am getting stuck on one question that appeared simpler than it was: How to remove the ...
greg salles's user avatar
0votes
0answers
74views

Cartopy facecolor='' not working as intended only for certain projections

I am using Cartopy 0.23.0 on a Windows 11 OS installed via conda-forge, Xarray version 2023.6.0, matplotlib version 3.8.4, and Python 3.9.19 . I am seeing strange behavior that I cannot figure out ...
beckib's user avatar
1vote
1answer
317views

How to apply stippling to contourf plots in Python?

I want to add stippling to Xarray DataArray data to indicate significance. The data is 2D climate data on a lat lon grid. I want to give a True/False mask to plot over mapped variable data. I am ...
Gen Tolhurst's user avatar
0votes
1answer
151views

Plot coastline over Xarray data for individual subplot

I'd like to overlay a coastline from cartopy onto one of my subplots but not the other, all of the solutions I've found so far lay the coastline over every subplot. Here is what I'm currently ...
thefrollickingnerd's user avatar
0votes
0answers
68views

can't clip xarray dataset

I'm trying to clip a tiff that has elevation GeoTIFF for North America, available here under Reference Files. I'd like to clip the dataset so it only contains data relevant to most of Alaska. When ...
BML's user avatar
  • 303
0votes
1answer
131views

How do I animate xarray data using matplotlib?

I am trying to animate a plot using matplotlib's FuncAnimation, however it never outputs anything. The data is NetCDF, precipitation rates for the USA with coords for day, x and y. The x is longitude ...
clavulinopsis's user avatar
0votes
0answers
145views

Clip spatial data to polygon in python

Good day, I am trying to create a spatial plot of gridded precipitation data. I have opened the netCDF using xarray. However, the data is currently not land-only (Figure 1) and I want it to only cover ...
Jessica's user avatar
0votes
0answers
58views

Remove white spaces in subplots matplolib

I try to plot the subplots as shown below. It works okay but it still have some white spaces at the end of figure. Is it possible remove white spaces. Any help would be very great. Here is the code ...
Tuyen's user avatar
  • 1,121
3votes
2answers
215views

Using xarray with resample and interpolate to animate the movement of contours

Lets say I have the following python code, showing a contour value at 12pm and 1pm, indicating that it's position has moved: import xarray as xr import numpy as np import matplotlib.pyplot as plt from ...
John's user avatar
  • 401
3votes
1answer
193views

Why does subplot_kws projection hides the lat and lon?

With a xarray dataset, how can I use FacetGrid with a specific cartopy projection and keep the latitude and longitude values along the axis? I was trying to use faceting as described in the user-guide ...
dodohjk's user avatar
0votes
1answer
491views

How to use matplotlib.pyplot.contourf to plot a density array

I have an xarray Dataset called dens that I would like to plot. This is the Dataset: <xarray.Dataset> Dimensions: (time: 641, lat: 30, lon: 30) Coordinates: * time (time) datetime64[ns] ...
Yotam Ben Saadon's user avatar
1vote
0answers
41views

Quiverplot adds a number to the plot in top right corner [duplicate]

I have an xarray's dataset (DS in the code below) with geophysical data. When I am plotting it using quiver, a dot with a number appears in the top right corner, outside of the plot's range: the dot. ...
Rychnowski's user avatar
0votes
1answer
58views

Looping through plots, then taking sum of a select number of plots

I am trying to create a function that plots EOFs and loops through each mode. This part is fine and I had no trouble getting out a plot of the 12 EOFs. However, now I would like to sum across the ...
humanoid_physics's user avatar
0votes
1answer
626views

Issue plotting WRF Data with Lambert Projection -Coastlines overlay not being displayed on top of data

I recently started using python via jupyter on windows to plot netCDF data. However I am having issues plotting output data I have from a WRF run that uses Lambert Conformal projection. I cannot seem ...
Jean's user avatar

153050per page
close